/**
 * 
 */
function logout(){
	$.ajax( 
		{
			url: 'http://www.quepasa.com/logout.php',
			type: 'get',
			dataType: 'json',
			jsonp: function(){},
			success: function(resp){ 
				cargar('index.php', resp);
			}
		}
	);
}

function login(){
	$.ajax( 
		{
			url: 'http://www.quepasa.com/secure/services/user/v1/login.php?callback=?',
			data: $('form#login').serialize(),
			type: 'get',
			dataType: 'json',
			jsonp: function(){},
			success: function(resp){ 
				cargar('page2.php', resp);
			}
		}
	);
}

function getMenu(){
	var resp;
	$.ajax( 
		{
			url: '/menu-json.php',
			type: 'POST',
			dataType: 'json',
			jsonp: function(){},
			success: function(resp){}
		}
	);
	return resp;
}
function cargar(page, data){
	console.log(page);
	if (data.msg == 'MSG_SUCCESS'){
		$.mobile.changePage(page, 
			{
				type: 'get',
				transition: 'flip',		
			}		 
		)
	}else{
		
	}
}

$(document).bind('pagechange', function(e, data) {
	console.log('Entro al page change 2222 ');

});


